#include "my_head.h"

bool Order_Delete(p_order_node head)
{
    char a[20];
    if(head==NULL)
    {
        printf("error\n");
        return false;
    }
    printf("请输入你想要删除的航班订单的航班号:");
    scanf("%s",a);
    p_order_node p=head;
    p_order_node x=head->next;
    while(x!=NULL&&strcmp(a,x->data.flight_Number)!=0)
    {
        x=x->next;
    }
    if(x!=NULL)
    {
        p->next=x->next;
        free(x);
        printf("取消预订成功！\n");
        printf("=============\n");
        return true;
    }else
    {
        printf("未找到该航班！\n");
        printf("=============\n");
        return false;
    }
}